package com.lightboat.system.domain.request;

import io.swagger.v3.oas.annotations.media.SchemaProperty;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 物流发货
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LogisticsShippingRequest implements Serializable {
    @SchemaProperty(name = "订单ID")
    @NotNull(message = "订单ID不能为空")
    private Long orderId;

    @SchemaProperty(name = "物流备注")
    private String remark;

    /** 物流编号 */
    @SchemaProperty(name = "物流编号,shippingType = 2时必填")
    private String logisticsNo;

    @SchemaProperty(name = "物流平台编码,shippingType = 2时必填")
    private String logisticsPlatformCode;

    @NotNull(message = "发货类型不能为空")
    @SchemaProperty(name = "发货类型  1 系统发货 2 自主发货，都是我给你传的")
    private Integer shippingType;

    public LogisticsShippingRequest(Long orderId) {
        this.orderId = orderId;
    }

    public LogisticsShippingRequest(Long orderId, String logisticsPlatformCode) {
        this.orderId = orderId;
        this.logisticsPlatformCode = logisticsPlatformCode;
    }

    public LogisticsShippingRequest(Long orderId, String logisticsPlatformCode, Integer shippingType) {
        this.orderId = orderId;
        this.logisticsPlatformCode = logisticsPlatformCode;
        this.shippingType = shippingType;
    }
}
